<div id="valentine_offer">
<div class="latest-activity{% unless section.settings.full_width %} page-width{% endunless %}">
    {% if section.settings.heading != blank %}
    <h2 class="heading">{{ section.settings.heading  }}</h2>
    {% endif %}

     <div class="grid">
        <div class="grid__item">
            <div class="latest-svg">
                {% render 'icon-valentine' %}
            </div>
            <div class="offer-content">
              {%- for block in section.blocks -%}
                {% case block.type %}
                  {%- when 'heading' -%}
                    <h2 class="image-with-text__heading h1 heading-{{ forloop.index0 }}" {{ block.shopify_attributes }}>
                      {{ block.settings.heading | escape }}
                    </h2>
                    {%- when 'title' -%}
                      {% if block.settings.text != blank %}

                      <div class="offer"> {% render 'icon-love' %} <span>{{ block.settings.text }}</span> </div>
              
                      
                      {% endif %}
                  {%- when 'text' -%}
                    <div class="text-{{ forloop.index0 }} image-with-text__text rte" {{ block.shopify_attributes }}>{{ block.settings.text }}</div>
                  {%- when 'button' -%}
                    {%- if block.settings.button_label != blank -%}
                      <a{% if block.settings.button_link != blank %} href="{{ block.settings.button_link }}"{% endif %} class="tenways-hover button{% if block.settings.button_style_secondary %} button--secondary{% else %} button--primary{% endif %}"{% if block.settings.button_link == blank %} aria-disabled="true"{% endif %} {{ block.shopify_attributes }}>
                        {{ block.settings.button_label | escape }}
                      </a>
                    {%- endif -%}     
                {%- endcase -%}
              {%- endfor -%}
            </div>
            <div class="lock">
             <img src="https://cdn.shopifycdn.net/s/files/1/0592/2167/2098/files/Lock_love.png?v=1675070449" alt="">
            </div>
        </div>
        <div class="grid__item">
            <div class="pc_banner image-with-text__media image-with-text__media--{{ section.settings.height }} {% if section.settings.image != blank %}media{% else %}image-with-text__media--placeholder placeholder{% endif %}"
        {% if section.settings.height == 'adapt' and section.settings.image != blank %} style="padding-bottom: {{ 1 | divided_by: section.settings.image.aspect_ratio | times: 100 }}%;"{% endif %}
    >
        {%- if section.settings.image != blank -%}
        <img
            srcset="{%- if section.settings.image.width >= 165 -%}{{ section.settings.image | img_url: '165x' }} 165w,{%- endif -%}
            {%- if section.settings.image.width >= 323 -%}{{ section.settings.image | img_url: '323x' }} 323w,{%- endif -%}
            {%- if section.settings.image.width >= 360 -%}{{ section.settings.image | img_url: '360x' }} 360w,{%- endif -%}
            {%- if section.settings.image.width >= 535 -%}{{ section.settings.image | img_url: '535x' }} 535w,{%- endif -%}
            {%- if section.settings.image.width >= 750 -%}{{ section.settings.image | img_url: '750x' }} 750w,{%- endif -%}
            {%- if section.settings.image.width >= 1070 -%}{{ section.settings.image | img_url: '1070x' }} 1070w,{%- endif -%}
            {%- if section.settings.image.width >= 1500 -%}{{ section.settings.image | img_url: '1500x' }} 1500w,{%- endif -%}
            {{ section.settings.image | img_url: 'master' }} {{ section.settings.image.width }}w"
            data-src="{{ section.settings.image | img_url: '1500x' }}"
            sizes="(min-width: {{ settings.page_width }}px) {{ settings.page_width | minus: 100 | divided_by: 2 }}px, (min-width: 750px) calc((100vw - 130px) / 2), calc((100vw - 50px) / 2)"
            alt="{{ section.settings.image.alt | escape }}"
            loading="lazy"
            class="lazyload"
            width="{{ section.settings.image.width }}"
            height="{{ section.settings.image.height }}"
        >
        {%- else -%}
        {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
        {%- endif -%}
            </div>
            <div class="image_mobile image-with-text__media image-with-text__media--{{ section.settings.height }} {% if section.settings.image_mobile != blank %}media{% else %}image-with-text__media--placeholder placeholder{% endif %}"
        {% if section.settings.height == 'adapt' and section.settings.image_mobile != blank %} style="padding-bottom: {{ 1 | divided_by: section.settings.image_mobile.aspect_ratio | times: 100 }}%;"{% endif %}
    >
        {%- if section.settings.image_mobile != blank -%}
        <img
        srcset="{%- if section.settings.image_mobile.width >= 375 -%}{{ section.settings.image_mobile | img_url: '375x' }} 375w,{%- endif -%}
        {%- if section.settings.image_mobile.width >= 412 -%}{{ section.settings.image_mobile | img_url: '412x' }} 412w,{%- endif -%}
        {%- if section.settings.image_mobile.width >= 750 -%}{{ section.settings.image_mobile | img_url: '750x' }} 750w,{%- endif -%}
        {%- if section.settings.image_mobile.width >= 1100 -%}{{ section.settings.image_mobile | img_url: '1100x' }} 1100w,{%- endif -%}
        {%- if section.settings.image_mobile.width >= 1500 -%}{{ section.settings.image_mobile | img_url: '1500x' }} 1500w,{%- endif -%}
        {%- if section.settings.image_mobile.width >= 1780 -%}{{ section.settings.image_mobile | img_url: '1780x' }} 1780w,{%- endif -%}
        {%- if section.settings.image_mobile.width >= 1903 -%}{{ section.settings.image_mobile | img_url: '1903x' }} 1903w,{%- endif -%}
        {{ section.settings.image_mobile | img_url: 'master' }} {{ section.settings.image_mobile.width }}w"
        sizes="{% if section.settings.image_2 != blank and section.settings.stack_images_on_mobile %}(min-width: 750px) 50vw, 100vw{% elsif section.settings.image_2 != blank %}50vw{% else %}100vw{% endif %}"
        src="{{ section.settings.image_mobile | img_url: '1500x' }}"
        loading="lazy"
        alt="{{ section.settings.image_mobile.alt | escape }}"
        width="{{ section.settings.image_mobile.width }}"
        height="{{ section.settings.image_mobile.width | divided_by: section.settings.image_mobile.aspect_ratio }}"
        >
        {%- else -%}
        {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
        {%- endif -%}
            </div>
        </div>
     </div>
</div>
</div>



{% schema %}
    {
      "name": "Latest activity",
      "tag": "section",
      "class": "index-latest spaced-section spaced-section--full-width",
      "settings": [
        {
          "type": "text",
          "id": "heading",
          "default": "Latest activity",
          "label": "Heading"
        },
        {
      "type": "image_picker",
      "id": "image",
      "label": "t:sections.image-with-text.settings.image.label"
    },
    {
      "type": "image_picker",
      "id": "image_mobile",
      "label": "Image mobile"
    },
    {
      "type": "select",
      "id": "height",
      "options": [
        {
          "value": "adapt",
          "label": "t:sections.image-with-text.settings.height.options__1.label"
        },
        {
          "value": "small",
          "label": "t:sections.image-with-text.settings.height.options__2.label"
        },
        {
          "value": "large",
          "label": "t:sections.image-with-text.settings.height.options__3.label"
        }
      ],
      "default": "adapt",
      "label": "t:sections.image-with-text.settings.height.label"
    },
        {
          "type": "checkbox",
          "id": "full_width",
          "label": "t:sections.video.settings.full_width.label",
          "default": false
        }
      ],
      "blocks": [
    {
      "type": "heading",
      "name": "t:sections.image-with-text.blocks.heading.name",
      "settings": [
        {
          "type": "text",
          "id": "heading",
          "default": "Image with text",
          "label": "t:sections.image-with-text.blocks.heading.settings.heading.label"
        }
      ]
    },
    {
      "type": "text",
      "name": "t:sections.image-with-text.blocks.text.name",
      "settings": [
        {
          "type": "richtext",
          "id": "text",
          "default": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>",
          "label": "t:sections.image-with-text.blocks.text.settings.text.label"
        }
      ]
    },
    {
      "type": "title",
      "name": "Title",
      "settings": [
        {
          "type": "text",
          "id": "text",
          "label": "Text"
        },
        {
          "type": "text",
          "id": "text_us",
          "label": "Text US"
        }
      ]
    },
    {
      "type": "button",
      "name": "t:sections.image-with-text.blocks.button.name",
      "settings": [
        {
          "type": "text",
          "id": "button_label",
          "default": "Button label",
          "label": "t:sections.image-with-text.blocks.button.settings.button_label.label",
          "info": "t:sections.image-with-text.blocks.button.settings.button_label.info"
        },
        {
          "type": "url",
          "id": "button_link",
          "label": "t:sections.image-with-text.blocks.button.settings.button_link.label"
        }
      ]
    }
  ],
      "presets": [
        {
          "name": "Latest activity"
        }
      ]
    }
      {% endschema %}